package com.library.mapper;

import com.library.entity.BorrowRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

@Mapper
public interface BorrowRecordMapper {
    List<BorrowRecord> findAll();
    
    BorrowRecord findById(@Param("id") Long id);
    
    List<BorrowRecord> findByBookId(@Param("bookId") Long bookId);
    
    List<BorrowRecord> findActiveBorrows();
    
    int insert(BorrowRecord record);
    
    int update(BorrowRecord record);
    
    int updateStatus(@Param("id") Long id, @Param("status") Integer status);
}
